#ifndef Bike_Display_ECM_Functions_H_
#define Bike_Display_ECM_Functions_H_


// ECM UART send/receive values
#define ECMUART         UART5   //Definition for ECM UART port

#define SOH             0x01    //Start of header
#define PC              0x00    //PC Sender or Receiver
#define ECM             0x42    //ECM Sender or Receiver
#define EOH             0xFF    //End of header
#define SOT             0x02    //Start of text
#define GET             0x52    //Request data for ECM
#define SET             0x57    //Send data to ECM
#define EOT             0x03    //End of text
#define SUCCESS         0x06    //Successful transmission

// Special values for testing components via the virtual page
#define VIRTUALPAGE     0x20
#define CLEARCODES      0x01
#define FRONTCOIL       0x02
#define REARCOIL        0x03
#define TACHOMETER      0x04
#define FUELPUMP        0x05
#define FRONTINJECTOR   0x06
#define REARINJECTOR    0x07
#define TPSRESET        0x08
#define FAN             0x09
#define EXHAUSTVALVE    0x0A

// Special commands to get version number and runtime data
#define GETVERSION      0x56
#define GETRUNTIMEDATA  0x43


// Function proto types
void ECMVersion_RuntimeData(char cDataSize, char cCommandCode);
void SendDataToECM(char *cBuffer, UINT8 nSize);
char GetDataFromECM(char *cBuffer, UINT8 nMaxSize);

#endif